package com.example.startupdemo;

import android.content.Context;
import android.util.Log;

/**
 * @author: tuyrt7 on 2020/11/30.
 */
public class Sdk1 {

    private static final String TAG = "Sdk1";

    private static Context sApplicationContext;

    private static volatile Sdk1 sInstance;

    public static void init(Context applicationContext) {
        sApplicationContext = applicationContext;
    }

    public static Sdk1 get() {
        if (sInstance == null) {
            synchronized (Sdk1.class) {
                if (sInstance == null) {
                    sInstance = new Sdk1();
                }
            }
        }
        return sInstance;
    }

    private Sdk1() {
    }

    public void printApplicationName() {
        Log.e(TAG, "Sdk1 printApplicationName " + sApplicationContext.getPackageName());
    }
}
